#ifndef MINIMUSIC_H
#define MINIMUSIC_H

#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class MiniMusic; }
QT_END_NAMESPACE

class MiniMusic : public QWidget
{
    Q_OBJECT

public:
    MiniMusic(QWidget *parent = nullptr);
    ~MiniMusic();

    void initUI();

protected:
    // 重写 QWidget 类的鼠标单击和鼠标滚轮
    void mousePressEvent(QMouseEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    // 记录光标相对于窗口标题的相对距离
    QPoint dragPosition;
private slots:
    void on_quit_clicked();

private:
    Ui::MiniMusic *ui;
};
#endif // MINIMUSIC_H
